-
Notifications
You must be signed in to change notification settings - Fork 9
DX-2849 Add webrtc_utils
#110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add WebRTC Utilities module with helper methods to generate transfer BXML
| Returns: | ||
| str: <Transfer> BXML Verb | ||
| """ | ||
| uui = "".join(voice_call_id.split("-")[1::]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could make a private helper to generate the Transfer and reuse it in this function and in generate_transfer_bxml
bandwidth/utilities/web_rtc.py
Outdated
| from bandwidth.model.bxml.verbs import * | ||
|
|
||
|
|
||
| def _generate_transfer_verb(device_token: str, voice_call_id: str, sip_uri: str = 'sip:sipx.webrtc.bandwidth.com:5060') -> Transfer: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better or worse, iIn the SDK for all of our other languages the generate_transfer_verb() equivalent returns the BXML. This is the node version: https://github.com/Bandwidth/node-webrtc/blob/main/src/controllers/apiController.ts#L345
To make it consistent across languages perhaps name this one something like generate_transfer_verb_model, generate_transfer_bxml would become generate_transfer_bxml_verb, and generate_transfer_bxml_document would become generate_transfer_bxml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version of the SDK Will be breaking - so we could take the opprotunity to standardize on new names for all of the languages. We will be writing migration documentation for each language before going live.
Im fine with
_generate_transfer_model()
generate_transfer_bxml_verb()
generate_transfer_bxml()if you guys are happy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me
Add WebRTC Utilities module with helper methods to generate transfer BXML